{extend name="default/template/base_index" /}


{block name="area_header"}

    <script type="text/javascript" src="__CDN__/zeroclipboard/2.2.0/ZeroClipboard.min.js" ></script>


{/block}

{block name="area_body"}
    {include file="default/Widget/topbar" /}
    <div class="admin-main container-fluid">
        {include file="default/Widget/left" /}
        <div class="admin-main-content">
            {include file="default/Widget/breadcrumb" /}

            <div class="filter-controls">

            </div>
            <div class="form-control-static">
                <a href="{:url('MemberGroup/addGroup')}"  class="btn btn-primary btn-sm" ><i class="fa fa-plus"></i>添加</a>
            </div>

            <div class="table-responsive">
                <table class="table table-striped table table-hover  table-condensed">
                    <thead>
                    <tr>
                        <th>
                            <input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />ID
                        </th>
                        <th>
                            等级名称
                        </th>
                        <th>
                            等级描述
                        </th>
                        <th>
                            创建时间
                        </th>
                        <th>
                            优惠比例(单位%)
                        </th>
                        <th>
                            返佣比例(单位%)
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    {empty name="list"}
                        <tr>
                            <td colspan="7" class="text-center" >{:L('NO_DATA')}</td>
                        </tr>
                    {/empty}
                    {volist name="list" id="vo"}
                        <tr>
                            <td>
                                <input type="checkbox" value="{$vo.id}" name="ids[]" class="selectitem" />{$vo.id}</td>
                            <td><a href="{:url('MemberGroup/groupView',array('id'=>$vo['id'],'store_id'=>I('get.store_id','')))}">{$vo.name}</a></td>
                            <td>{$vo.remark}</td>
                            <td>{$vo.createtime|date='Y-m-d H:i:s',###}</td>
                            <td>
                                {$vo['discount_ratio']*100}
                            </td>
                            <td>
                                {$vo['commission_ratio']*100}
                            </td>
                            <td>

                                <a href="{:url('MemberGroup/groupView',array('id'=>$vo['id']))}" class="btn btn-default btn-sm"><i class="fa fa-eye"></i>{:L('BTN_VIEW')}</a>
                                <a href="{:url('MemberGroup/groupUpdate',array('id'=>$vo['id']))}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i>{:L('BTN_EDIT')}</a>
                                <a href="{:url('MemberGroup/uidMgroupIndex',array('store_id'=>$vo['store_id'],'id'=>$vo['id'],'groupname'=>$vo['name']))}" class="btn btn-primary btn-sm"><i class="fa fa-user"></i>关联用户</a>
                                <if condition=" is_administrator() ">
                                    <a href="{:url('MemberGroup/deleteGroup',array('id'=>$vo['id']))}" class="btn btn-danger btn-sm ajax-get confirm"><i class="fa fa-trash-o"></i> {:L('BTN_DELETE')}</a>
                                </if>
                            </td>

                        </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
        </div>

    </div>
{/block}

{block name="area_footer"}
    <script>

    </script>
{/block}